#ifndef NFC_H
#define NFC_H

#include <qmobilityglobal.h>
#include <qnearfieldtarget.h>
#include <QtGui/QWidget>



QTM_BEGIN_NAMESPACE
class QNearFieldTarget;
class QNearFieldManager;
class QNdefMessage;
QTM_END_NAMESPACE

QTM_USE_NAMESPACE


class NFC : public QWidget
{
    Q_OBJECT
    public:
    explicit NFC(QWidget *parent = 0);
    void startListing();
    void stopListning();



    signals:
    void sendUid(QByteArray mUid);
    void sendError(QString mErrorId);
    void sendNDFMSG(QByteArray mNDFMsg);


    private:

    QNearFieldManager *m_manager;

    public slots:
    void targetDetected(QNearFieldTarget *target);
    void targetLost(QNearFieldTarget *target);
    void targetDetected(const QNdefMessage &message, QNearFieldTarget *target);

    private slots:
    void targetError(QNearFieldTarget::Error error, const QNearFieldTarget::RequestId &id);
    void displayNdefMessage(const QNdefMessage &message);
};

#endif // NFC_H
